package com.warren.financial.lease.realtime.util;

import com.warren.financial.lease.realtime.common.FinancialLeaseCommon;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * @AUTHOR warren
 * @date 2023/12/12
 **/
public class MysqlUtil {

    public static Connection getConnection(){
        Connection connection = null;

        try {
            connection = DriverManager.getConnection(FinancialLeaseCommon.MYSQL_URL,FinancialLeaseCommon.DORIS_USER_NAME, FinancialLeaseCommon.MYSQL_PASSWD);
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
        return connection;
    }
}
